package com.ruoyi.basedata.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseDO;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 小表实时数据视图对象 v_t_realtimegatherdata_xb_view
 *
 * @author gdqt
 * @date 2024-03-18
 */
@TableName("v_t_realtimegatherdata_xb_view")
public class RealtimegatherdataXbView extends BaseDO {
    private static final long serialVersionUID = 1L;

    /**
     * 用户归属水司
     */
    @TableField("tenant_id")
    private String tenantId;

    /**
     * 用户名称
     */
    @Excel(name = "用户名称")
    @TableField("user_name")
    private String userName;

    /**
     * 用户编号
     */
    @Excel(name = "用户编号")
    @TableField("user_id")
    private String userId;

    /**
     * 门牌号
     */
    @Excel(name = "门牌号")
    @TableField("install_address")
    private String installAddress;

    /**
     * 设备编号
     */
    @Excel(name = "设备编号")
    @TableField("terminal_id")
    private String terminalId;

    /**
     * 用户通讯地址
     */
    @Excel(name = "用户通讯地址")
    @TableField("user_address")
    private String userAddress;

    @Excel(name = "水表读数(m³)")
    @TableField(exist = false)
    private String totalFlowStr;

    /**
     * 水表读数
     */
    @TableField("total_flow")
    private BigDecimal totalFlow;

    /**
     * 信号
     */
    @TableField("terminal_csq")
    private Long terminalCsq;

    /**
     * 终端电压
     */
    @Excel(name = "终端电压(V)")
    @TableField("terminal_vol")
    private String terminalVol;

    /**
     * 阀门状态(0-关，1-开)
     */
    @Excel(name = "阀门状态", readConverterExp = "0=关,1=开")
    @TableField("valve_state")
    private Long valveState;

    /**
     * 抄表时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "抄表时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("read_date")
    private Date readDate;

    /**
     * 区域编号
     */
    @TableField("sheets_code")
    private String sheetsCode;

    /**
     * 区域名称
     */
    @TableField("sheets_name")
    private String sheetsName;

    /**
     * 报警状态描述
     */
    private String description;

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTerminalId(String terminalId) {
        this.terminalId = terminalId;
    }

    public String getTerminalId() {
        return terminalId;
    }

    public void setTotalFlow(BigDecimal totalFlow) {
        this.totalFlow = totalFlow;
    }

    public BigDecimal getTotalFlow() {
        return totalFlow;
    }

    public String getTotalFlowStr() {
        return totalFlowStr;
    }

    public void setTotalFlowStr(String totalFlowStr) {
        this.totalFlowStr = totalFlowStr;
    }

    public void setTerminalCsq(Long terminalCsq) {
        this.terminalCsq = terminalCsq;
    }

    public Long getTerminalCsq() {
        return terminalCsq;
    }

    public void setTerminalVol(String terminalVol) {
        this.terminalVol = terminalVol;
    }

    public String getTerminalVol() {
        return terminalVol;
    }

    public void setValveState(Long valveState) {
        this.valveState = valveState;
    }

    public Long getValveState() {
        return valveState;
    }

    public void setReadDate(Date readDate) {
        this.readDate = readDate;
    }

    public Date getReadDate() {
        return readDate;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setSheetsCode(String sheetsCode) {
        this.sheetsCode = sheetsCode;
    }

    public String getSheetsCode() {
        return sheetsCode;
    }

    public void setInstallAddress(String installAddress) {
        this.installAddress = installAddress;
    }

    public String getInstallAddress() {
        return installAddress;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserId() {
        return userId;
    }

    public void setSheetsName(String sheetsName) {
        this.sheetsName = sheetsName;
    }

    public String getSheetsName() {
        return sheetsName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("tenantId", getTenantId())
                .append("terminalId", getTerminalId())
                .append("totalFlow", getTotalFlow())
                .append("terminalCsq", getTerminalCsq())
                .append("terminalVol", getTerminalVol())
                .append("valveState", getValveState())
                .append("readDate", getReadDate())
                .append("userAddress", getUserAddress())
                .append("sheetsCode", getSheetsCode())
                .append("installAddress", getInstallAddress())
                .append("userName", getUserName())
                .append("userId", getUserId())
                .append("sheetsName", getSheetsName())
                .toString();
    }
}
